package com.bailiban.controller;

import com.bailiban.entity.ProvinceCov;
import com.bailiban.service.ProvinceCovService;
import com.bailiban.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhulang
 * @Classname ProvinceCovController
 * @Description TODO
 * @Date 2020/3/25 15:14
 */
@RestController
@RequestMapping("/provinceCov")
@Api(tags = "省份疫情控制器")
public class ProvinceCovController {
    @Autowired
    private ProvinceCovService provinceCovService;

    /**
     * 查询所有身份疫情数据
     * @return
     */
    @GetMapping("/all")
    @ApiOperation(value = "查询所有身份的疫情数据",notes = "全省份列表数据")
    public Result findAll(){
        List<ProvinceCov> all = provinceCovService.findAll();
        return Result.success(all);
    }
}
